<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        /* 给父容器display:flex,子元素就会并排显示 */
        .parent{
            width:1000px;
            background: red;
            display: flex;
            /* flex-direction:row|column */
            flex-direction: column;
            /* 
            flex-direction:column设置为列
            justify-content设置垂直方向
            align-items设置水平方向
             */
            height: 500px;
            justify-content: center;
            align-items: center;
        }
        .parent div{
            width:100px;
            height: 100px;
            border:1px solid #333;
        }
    </style>
</head>
<body>
    <div class="parent">
        <div></div>
        <div></div>
        <div></div>
    </div>
</body>
</html>